﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AnQinFrameWorkAPI.Entity.SystemCore.Entity;

/// <summary>
///     菜单字段表模型
/// </summary>
[Table("MenuField")]
public class MenuFieldModel
{
    #region 关联

    /// <summary>
    ///     菜单表
    /// </summary>
    public virtual MenuModel Menu { get; set; }

    #endregion

    #region 字段

    /// <summary>
    ///     菜单字段id（主键）
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     菜单id（必填）
    /// </summary>
    [MaxLength(36)]
    public Guid MenuId { get; set; }

    /// <summary>
    ///     字段key（必填）
    /// </summary>
    [MaxLength(20)]
    public string Key { get; set; }

    /// <summary>
    ///     字段名称（必填）
    /// </summary>
    [MaxLength(20)]
    public string Name { get; set; }

    /// <summary>
    ///     字段备注（可选）
    /// </summary>
    [Column(TypeName = "nvarchar(max)")]
    public string? Remark { get; set; }

    #endregion
}